import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import './permission' // 路由权限 白名单等
// 重置样式使用normalize.css，项目公用样式common.less
import 'normalize.css'
import '@/assets/styles/common.less'
// 引入所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import { VueMasonryPlugin } from 'vue-masonry'
// mockjs
import '@/mock'
import Print from 'vue3-print-nb'

// 导入自己的UI插件组件库
import UI from '@/components/library'
const app = createApp(App)

// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// 创建一个vue应用实例
app.use(store).use(router).use(VueMasonryPlugin).use(Print).use(UI).mount('#app')
